package com.example.demo5072.repository;

import com.example.demo5072.pojo.App;
import org.bson.types.ObjectId;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author lzh
 * @date 2019/7/30 - 16:03
 */
@Repository
public interface AppRepository extends MongoRepository<App , ObjectId>  {

    App  findOneByName(String name);

    List<App>  queryByName(String name);

    Page<App>  queryByName(String name, Pageable pageable);

    long countByName(String name);


    boolean existsByName(String name);










}
